1. Field of the Invention
The present invention relates to a semiconductor device. In particular, the present invention relates to a semiconductor device to which power supply is stopped as appropriate during its operation. Further, the present invention relates to a driving method of the semiconductor device. Note that in this specification, a semiconductor device refers to a device which is capable of functioning by utilizing semiconductor characteristics.
2. Description of the Related Art
A semiconductor device such as a central processing unit (CPU) has a variety of configurations depending on its application. The semiconductor device generally has some kinds of memory devices such as a register and a cache memory as well as a main memory for storing data or a program. A register has a function of temporarily holding data for carrying out arithmetic processing, holding a program execution state, or the like. In addition, a cache memory is located between an arithmetic circuit and a low-speed main memory in order to reduce access to the main memory and speed up the arithmetic processing.
A register and a cache memory need to operate at higher speed in reading or writing data than a main memory. Thus, in many cases, a flip-flop is used as a register, and a static random access memory (SRAM) is used as a cache memory.
In order to reduce power consumption, supply of power source voltage to a semiconductor device is preferably stopped as appropriate (for example, in a period during which data is not input or output). Note that a flip-flop, an SRAM, and the like are volatile memory devices. Therefore, in the case where supply of power source voltage to a semiconductor device is stopped, data which has been lost in a volatile memory device such as a register or a cache memory need to be restored after the supply of power source voltage is restarted. For example, the following process is necessary: needed data is read from an auxiliary memory device provided in the outside of the semiconductor device to be newly written to the volatile memory device in a signal processing circuit. This leads to an operation delay of the signal processing circuit.
In view of this, a semiconductor device in which a nonvolatile memory device is located in the periphery of a volatile memory device has been developed. For example, Patent Document 1 discloses the following technique: data held in a flip-flop or the like is stored in a ferroelectric memory before supply of power source voltage is stopped, and the data stored in the ferroelectric memory is restored to the flip-flop or the like after the supply of power source voltage is restarted.